package com.itheima.Demo3;

public class Test {
    public static void main(String[] args) {
        Cat cat = new Cat("花花",3,"翟罗猫");

        System.out.println("这只猫的名字叫:" + cat.getName() + "  " + "年龄:" + cat.getAge() + "岁,种类是" + cat.getType());
        cat.withPeople();
        Dog dog = new Dog("大黄",5,"黄色");
        System.out.println("这只狗的名字叫:" + dog.getName() + "  " + "年龄:" + dog.getAge() + "岁,颜色是" + dog.getColor());
        dog.withPeople();
    }
}
